<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>Title</title>
</head>
<body>

</body>
<script>
	// 实现一个等待函数，支持让 async 函数在执行时暂停一段时间，函数的入参为暂停的时间
	function wait(time){
		return new Promise(resolve => setTimeout(resolve,time))
	}
	async function a(){
		console.log(Date.now())
		await wait(5000)
		console.log(Date.now())
	}
	a()
</script>
</html>